Implement new VTPM model.
authorEwan Mellor <ewan@xensource.com>
Sat, 28 Oct 2006 11:14:47 +0000 (12:14 +0100)
committerEwan Mellor <ewan@xensource.com>
Sat, 28 Oct 2006 11:14:47 +0000 (12:14 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendAPI.py
tools/python/xen/xend/XendDomainInfo.py

index 1573be3b5857dfc5f48b31062df94548e5c23f9b..bed2c9ecf870a3e5c7488f7f5098706bd488eb8b 100644 (file)
@@ -514,8 +514,7 @@ class XendAPI:
                   'VCPUs_can_use',
                   'VIFs',
                   'VBDs',
-                  'TPM_instance',
-                  'TPM_backend',
+                  'VTPMs',
                   'PCI_bus',
                   'tools_version',
                   ]
@@ -642,6 +641,10 @@ class XendAPI:
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_success(dom.get_vbds())
     
+    def vm_get_vtpms(self, session, vm_ref):
+        dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+        return xen_api_success(dom.get_vtpms())
+    
     def vm_get_tpm_instance(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_todo() # unsupported by xc
@@ -929,8 +932,7 @@ class XendAPI:
             'actions_after_crash': xeninfo.get_on_crash(),
             'vifs': xeninfo.get_vifs(),
             'vbds': xeninfo.get_vbds(),
-            'tpm_instance': xeninfo.get_tpm_instance(),
-            'tpm_backend': xeninfo.get_tpm_backend(),
+            'vtpms': xeninfo.get_vtpms(),
             'bios_boot': xeninfo.get_bios_boot(),
             'platform_std_vga': xeninfo.get_platform_std_vga(),
             'platform_serial': xeninfo.get_platform_serial(),
index 8f677ae30bbc0e3082ae1f259447b7eda39ba7e7..721edad3033c1ffc1475ead654137790715aa3d6 100644 (file)
@@ -1837,6 +1837,9 @@ class XendDomainInfo:
     def get_vbds(self):
         return self.info.get('vbd_refs', [])
 
+    def get_vtpms(self):
+        return self.info.get('vtpm_refs', [])
+
     def create_vbd(self, xenapi_vbd):
         """Create a VBD device from the passed struct in Xen API format.